package com.alibaba.moco.didi;

import org.eclipse.jetty.server.Server;
import com.alibaba.moco.util.PropertiesUtils;


public class MocoMain {
	
	private static String MOCOPROT="moco_port";
	
	public static void main(String[] args) {
		try {
        	Server server = new Server(
        					Integer.parseInt(PropertiesUtils.getAttribute(MOCOPROT))
        					);
        	
            MocoHandle mocoHandle = new MocoHandle();
            	mocoHandle.setResourceBase("./src/main/webapp");
            server.setHandler(mocoHandle);
			server.start();
			server.join();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
    
}
